/* 状态工作流组件样式 */
.workflowContainer {
  position: fixed;
  z-index: 2000;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid #e8e8e8;
  min-width: 360px;
  max-width: 480px;
  max-height: 80vh;
  overflow: hidden;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 头部区域 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.headerInfo h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.roomInfo {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 2px;
  display: block;
}

.closeButton {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  line-height: 1;
}

.closeButton:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 当前状态显示 */
.currentStatus {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.currentStatusLabel {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

/* 无可用转换状态 */
.noTransitions {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
}

.noTransitions span {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.noTransitions p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

/* 转换选项容器 */
.transitionsContainer {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}

/* 分类组 */
.categoryGroup {
  margin-bottom: 8px;
}

.categoryLabel {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin: 0;
  padding: 12px 20px 8px;
  border-bottom: 1px solid #f1f3f4;
  background: #fafbfc;
}

.transitionsList {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px;
}

/* 转换按钮 */
.transitionButton {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  min-height: 60px;
}

.transitionButton:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.transitionButton[data-category="normal"]:hover {
  border-color: #28a745;
  background: #f8fff9;
}

.transitionButton[data-category="cleaning"]:hover {
  border-color: #17a2b8;
  background: #f1fcfd;
}

.transitionButton[data-category="maintenance"]:hover {
  border-color: #ffc107;
  background: #fffdf0;
}

.transitionButton[data-category="special"]:hover {
  border-color: #dc3545;
  background: #fff5f5;
}

/* 转换图标 */
.transitionIcon {
  font-size: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #f8f9fa;
  border-radius: 8px;
}

/* 转换内容 */
.transitionContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.transitionLabel {
  font-size: 15px;
  font-weight: 600;
  color: #212529;
  line-height: 1.2;
}

.transitionDescription {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.3;
}

.estimatedTime {
  font-size: 12px;
  color: #28a745;
  font-weight: 500;
  margin-top: 2px;
}

/* 转换箭头和目标状态 */
.transitionArrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.transitionArrow::before {
  content: '→';
  font-size: 16px;
  color: #6c757d;
  font-weight: bold;
}

/* 需要原因标识 */
.requiresReason {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 14px;
  color: #ffc107;
}

/* 原因输入对话框 */
.reasonDialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reasonDialogContent {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.2);
  animation: dialogSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dialogSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.reasonDialogContent h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #212529;
}

.reasonDialogContent p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #6c757d;
}

.reasonInput {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
}

.reasonInput:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.reasonInput::placeholder {
  color: #adb5bd;
}

.reasonActions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
}

.confirmButton {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirmButton:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-1px);
}

.confirmButton:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.cancelButton {
  background: transparent;
  color: #6c757d;
  border: 1px solid #dee2e6;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancelButton:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .workflowContainer {
    min-width: 320px;
    max-width: 90vw;
    left: 5vw !important;
    right: 5vw;
    top: 10vh !important;
  }

  .transitionButton {
    padding: 10px 12px;
    min-height: 50px;
  }

  .transitionIcon {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .transitionLabel {
    font-size: 14px;
  }

  .transitionDescription {
    font-size: 12px;
  }

  .reasonDialogContent {
    margin: 20px;
    max-width: none;
    width: auto;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px 16px;
  }

  .headerInfo h3 {
    font-size: 16px;
  }

  .roomInfo {
    font-size: 12px;
  }

  .currentStatus {
    padding: 12px 16px;
  }

  .categoryLabel {
    padding: 8px 16px 6px;
    font-size: 13px;
  }

  .transitionsList {
    padding: 4px;
  }

  .transitionButton {
    gap: 8px;
    padding: 8px 10px;
  }
}

/* 滚动条样式 */
.transitionsContainer::-webkit-scrollbar {
  width: 6px;
}

.transitionsContainer::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.transitionsContainer::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.transitionsContainer::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
